package main

import (
	"context"
	"fmt"
	"go.uber.org/zap"
	"google.golang.org/grpc"
	"mxshop_srvs/goods_srv/proto"
	"mxshop_srvs/goods_srv/tests"
)

/*
func TestCategoryBrandList() {
	rsp, err := tests.Client.CategoryBrandList(context.Background(), &proto.CategoryBrandFilterRequest{Page: 1, PagePerNums: 2})
	if err != nil {
		panic(err)
	}
	fmt.Println(rsp.Data)
}*/

func TestGetCategoryBrand() {
	rsp, err := tests.Client.GetCategoryBrand(context.Background(), &proto.CategoryInfoRequest{Id: 1})
	if err != nil {
		panic(err)
	}
	fmt.Println(rsp.Data)
}

func main() {
	tests.Init()
	TestGetCategoryBrand()
	defer func(Conn *grpc.ClientConn) {
		err := Conn.Close()
		if err != nil {
			zap.S().Errorf("conn.close错误")
		}
	}(tests.Conn)
}
